package com.ea.eadp.nexus.test.pageDefinition.newconsole;

import org.openqa.selenium.WebDriver;

public class NewDeviceCheckPage extends ConsoleBasePage {

   final static String passwordInputBox =  "loginPassword";
    
    public NewDeviceCheckPage(WebDriver driver) {
        super(driver, NewDeviceCheckPage.class, passwordInputBox);
    }
    
    public void enterPassword(String password) {
        log.info("Enter Password:" + password);
        sendInput(passwordInputBox, password);
        clickBlank("//div[@id='panel-basic']//div[@class='titleBar']");
        sendControllerKey('A');
    }
 
    public String getInvalidPasswordError() {
        return getElementStringByXPath("//li[@class='login-password-container']//span[@class='origin-ux-textbox-status-message origin-ux-status-message']");
    }
    
    public String getEmailAccount() {
        return getElementStringByXPath("//ul[@class='login-fields']//li//div[@class='emailText']");
    }
    
    public String getOriginId() {
        return getElementStringByXPath("//ul[@class='login-fields']//li//div[@class='emailText plain-origin-id']");
    }
}
